Autocomplete, DropDownButton, DropDownBox: Refactor and improve typing#33784
Open
vorobey wants to merge 21 commits into
Open
Autocomplete, DropDownButton, DropDownBox: Refactor and improve typing#33784vorobey wants to merge 21 commits into
vorobey wants to merge 21 commits into
Conversation
d981be3 to
3fc9002
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors internal implementations and public typings around DropDownButton / DropDownBox / Autocomplete and Overlay to reduce @ts-expect-error usage and better reflect runtime behavior (e.g., allowing null templates and function-valued hideOnParentScroll) across core, Angular, React, and Vue wrappers.
Changes:
- Updated public
.d.tstypings for nullable templates/selection (null) andhideOnParentScrollasboolean | (() => boolean). - Refactored internal DropDownButton/DropDownBox/Autocomplete code to use more explicit types and fewer
@ts-expect-errorsuppressions. - Propagated updated option typings into Angular/React/Vue wrapper prop/input/output definitions.
Reviewed changes
Copilot reviewed 55 out of 58 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/ts/dx.all.d.ts | Aligns bundled typings with nullable templates/selection and functional hideOnParentScroll. |
| packages/devextreme/js/ui/overlay.d.ts | Updates dxOverlayOptions typing for contentTemplate nullability and functional hideOnParentScroll. |
| packages/devextreme/js/ui/drop_down_button.d.ts | Improves DropDownButton option typing (nullable selection/template) and removes some default doc tags. |
| packages/devextreme/js/__internal/ui/radio_group/radio_group.ts | Removes a @ts-expect-error comment in option forwarding. |
| packages/devextreme/js/__internal/ui/m_tag_box.ts | Removes several @ts-expect-error comments around value/display handling. |
| packages/devextreme/js/__internal/ui/m_select_box.ts | Adds/adjusts explicit return types and removes @ts-expect-error comments around display getter usage. |
| packages/devextreme/js/__internal/ui/m_drop_down_button.ts | Large refactor to tighten typing, reduce suppressions, and adjust popup/list wiring and ARIA updates. |
| packages/devextreme/js/__internal/ui/m_drop_down_box.ts | Refactors typing around DataExpressionMixin usage and popup behaviors; replaces imports and removes suppressions. |
| packages/devextreme/js/__internal/ui/m_autocomplete.ts | Refactors typings/events and list configuration; replaces some imports and adds explicit signatures. |
| packages/devextreme/js/__internal/ui/drop_down_editor/drop_down_list.ts | Adds DataExpressionMixin workaround typings and removes some suppressions; adjusts display-value helper. |
| packages/devextreme/js/__internal/ui/drop_down_editor/drop_down_editor.ts | Adjusts @ts-expect-error placement for popup options typing. |
| packages/devextreme/js/__internal/events/utils/index.ts | Minor defensive typing change (e?.type) for wheel event detection. |
| packages/devextreme/js/__internal/data/data_controller/data_controller.ts | Exposes DataSourceType and loosens updateDataSource parameter optionality. |
| packages/devextreme/js/__internal/core/widget/widget.ts | Small cleanup (onKeyboardHandled?.(...)) and refines _setWidgetOption typing. |
| packages/devextreme-vue/src/tree-list.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/toast.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/tag-box.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/select-box.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/popup.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/load-panel.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/drop-down-button.ts | Updates selectedItemKey to allow null and updates hideOnParentScroll typing. |
| packages/devextreme-vue/src/drop-down-box.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/date-range-box.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/date-box.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/data-grid.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/color-box.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/card-view.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-vue/src/autocomplete.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-react/src/tree-list.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-react/src/tag-box.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-react/src/select-box.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-react/src/lookup.ts | Updates wrapper prop typing for nullable contentTemplate. |
| packages/devextreme-react/src/drop-down-button.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-react/src/drop-down-box.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-react/src/date-range-box.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-react/src/date-box.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-react/src/data-grid.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-react/src/color-box.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-react/src/card-view.ts | Updates wrapper prop typing for functional hideOnParentScroll. |
| packages/devextreme-react/src/autocomplete.ts | Updates wrapper prop typing for nullable contentTemplate and functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/tree-list/nested/popup.ts | Updates Angular input typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/tree-list/nested/filter-builder-popup.ts | Updates Angular input typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/toast/index.ts | Updates Angular input/output typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/tag-box/nested/drop-down-options.ts | Updates Angular input typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/select-box/nested/drop-down-options.ts | Updates Angular input typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/popup/component.ts | Updates Angular input/output typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/nested/base/popup-options.ts | Updates base nested popup options typing (notably contentTemplate / hideOnParentScroll). |
| packages/devextreme-angular/src/ui/load-panel/index.ts | Updates Angular input/output typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/drop-down-button/nested/drop-down-options.ts | Updates Angular nested dropdown option typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/drop-down-button/index.ts | Updates Angular input/output typing for nullable selection and selectedItemKey nullability. |
| packages/devextreme-angular/src/ui/drop-down-box/nested/drop-down-options.ts | Updates Angular nested dropdown option typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/date-range-box/nested/drop-down-options.ts | Updates Angular nested dropdown option typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/date-box/nested/drop-down-options.ts | Updates Angular nested dropdown option typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/data-grid/nested/popup.ts | Updates Angular nested popup option typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/data-grid/nested/filter-builder-popup.ts | Updates Angular nested popup option typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/color-box/nested/drop-down-options.ts | Updates Angular nested dropdown option typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/card-view/nested/load-panel.ts | Updates Angular nested load panel option typing for functional hideOnParentScroll. |
| packages/devextreme-angular/src/ui/autocomplete/nested/drop-down-options.ts | Updates Angular nested dropdown option typing for functional hideOnParentScroll. |
7cdc376 to
d6c6394
Compare
d6c6394 to
0726a73
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Andrey Vorobev <dobriy.kaa@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Andrey Vorobev <dobriy.kaa@gmail.com>
…declare for dataexpressionmixin
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Andrey Vorobev <dobriy.kaa@gmail.com>
4e961fb to
def93e7
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Andrey Vorobev <dobriy.kaa@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.